<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../js/jquery-1.10.1.min.js"></script>
    <style>
        * {
            padding: 0;
            margin: 0;
        }

        li {
            list-style: none;
        }

        .list {
            overflow: hidden;
        }

        .list li {
            line-height: 32px;
            /* text-indent: 1em; */
            border: 1px dashed #333;
        }

        button {
            width: 80px;
            height: 45px;
            margin: 10px;
        }
    </style>
</head>

<body>
    <div id="wrap">
        <h2>模拟封装jquery</h2>
        <div class="list">
            <li>01</li>
            <li>02</li>
            <li>03</li>
            <li>04</li>
            <li>05</li>
            <li>06</li>
            <li>07</li>
            <li>08</li>
        </div>
        <div class="buttons">
            <button class="html">html</button>
            <button class="hide">hide</button>
            <button class="show">show</button>
            <button class="width">width</button>
            <button class="height">height</button>
            <button class="css">css</button>
        </div>
    </div>
</body>
<script>

    $(".html").click(function () {
        $(".list li").html("hello world");
    });

    $(".hide").click(function () {
        $(".list li").hide("hello world");
    });

    $(".show").click(function () {
        $(".list li").show("hello world");
    });

    $(".width").click(function () {
        $(".list li").width(500);
    })

    $(".height").click(function () {
        $(".list li").height(100);
    })

    $(".css").click(function () {
        $(".list li").css({
            background: "red",
            lineHeight: "200px",
            textAlign: "center",
            color: "#6ff",
            width: "200px",
            height: "200px",
            float: "left",
        });
    })


    $(".list li").each(function (item, index) {
        console.log(item, index);
    })

</script>

</html>